//
//  ViewController.m
//  Block
//
//  Created by ZhangSai on 2021/10/13.
//

#import "ViewController.h"

@interface ViewController ()

//copy strong 修饰 有什么区别没
@property (nonatomic, copy) void(^BlockCopy)(void);
@property (nonatomic, strong) void(^BlockStrong)(void);

@property (nonatomic, assign) NSInteger age;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    _BlockCopy = ^ {
    };
    
    _BlockStrong = ^ {
    };
    
    NSLog(@"%@ --- %@ \n", _BlockCopy, _BlockStrong);

    
    _BlockCopy = ^ {
        self->_age = 10;
    };
    
    _BlockStrong = ^ {
        self->_age = 20;
    };
    
    NSLog(@"%@ --- %@", _BlockCopy, _BlockStrong);

}


@end
